// 自定义Pagefind UI样式
.pagefind-ui {
  width: 100%;
  max-width: 100%;
  font-family: inherit;
  color: white !important;
  // 搜索输入框
  .pagefind-ui__search-input {
    border: 2px solid var(--color-border);
    border-radius: 8px;
    padding: 0.8rem 1rem;
    font-size: 1rem;
    width: 100%;
    background-color: var(--color-bg);
    color: var(--color-text);
    transition: all 0.3s ease;
      &:focus {
      outline: none;
      border-color: var(--color-primary);
      box-shadow: 0 0 5px var(--color-primary-shadow);
    }
    
    &::placeholder {
      color: var(--color-text-light);
    }
  }
    // 结果容器
  .pagefind-ui__results {
    margin-top: 1rem;
  }
    
  // 结果项
  .pagefind-ui__result {
    padding: 2rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    background-color: var(--color-card-bg);
    transition: transform 0.2s ease;
    border: 2px solid rgba(255, 255, 255, 0.1) !important;

    &:hover {
      transform: translateY(-2px);
      box-shadow: 0 5px 10px rgba(0, 0, 0, 0.05);
    }
  }
  
  // 结果标题
  .pagefind-ui__result-title {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--color-heading);
    text-decoration: none;
    
    &:hover {
      color: var(--color-primary);
    }
  }
    // 结果摘要
  .pagefind-ui__result-excerpt {
    font-size: 0.9rem;
    color: var(--color-text);
    line-height: 1.6;
    margin-bottom: 0.5rem;
  }
    // 高亮文本
  mark {
    background-color: var(--color-primary-light);
    color: var(--color-primary);
    padding: 0 0.2rem;
    border-radius: 2px;
  }
  
  // 消息提示
  .pagefind-ui__message {
    padding: 1rem;
    background-color: var(--color-card-bg);
    border-radius: 8px;
    text-align: center;
    color: var(--color-text-light);
  }
    // 加载指示器
  .pagefind-ui__button {
    background-color: var(--color-primary);
    color: rgba(255, 255, 255, 0.171);
    border: none;
    border-radius: 6px;
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background-color 0.2s ease;
      &:hover {
      background-color: var(--color-primary-dark);
    }
  }
}

// 修改搜索悬浮框样式
.search-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1000;  display: flex;
  align-items: center;
  justify-content: center;
  visibility: hidden;
  opacity: 0;
  transition: visibility 0s linear 0.3s, opacity 0.3s ease;
  
  &.active {
    visibility: visible;
    opacity: 1;
    transition-delay: 0s;
  }
  
  .search-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
  }
  
  .search-box {
    position: relative;
    width: 90%;
    max-width: 700px;    max-height: 80vh;
    background-color: var(--color-card-bg);
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    z-index: 1001;
    animation: search-appear 0.3s ease;
    display: flex;
    flex-direction: column;
    
    .search-header {
      padding: 1rem 1.5rem;
      border-bottom: 1px solid var(--color-border);
      display: flex;
      align-items: center;
      justify-content: space-between;
      
      h2 {
        margin: 0;
        font-size: 1.25rem;
        color: var(--color-heading);
      }
        .search-close {
        background: none;
        border: none;
        cursor: pointer;
        color: var(--color-text-light);
        transition: color 0.2s ease;
        padding: 0.5rem;
        margin: -0.5rem;
        line-height: 0;
        
        &:hover {
          color: var(--color-primary);
        }
      }
    }
    
    .search-content {
      padding: 1.5rem;
      overflow-y: auto;
      flex: 1;
    }
  }
}

@keyframes search-appear {
  from {
    transform: translateY(20px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

// 响应式样式
@media (max-width: 768px) {
  .search-container {
    .search-box {
      width: 95%;
      max-width: 95%;
      max-height: 90vh;
    }
  }
}

.pagefind-ui__search-clear {
  background-color: rgba(255, 255, 255, 0) !important;
  text-color: var(--color-text-light) !important;
  border: none;
  border-radius: 6px;
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
  cursor: pointer;
  transition: background-color 0.2s ease;
  
    &:hover {
    background-color: 
  }
}
.pagefind-ui__result-link{
  background-image: linear-gradient(90deg, rgba(255,255,255,0.9), rgba(1, 162, 190, 0.9)) !important;
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  background-clip: text !important;
}

mark{
  background-color: rgba(42, 246, 253, 0.5) !important;
}

.pagefind-ui__result-inner{
  margin-left: 2rem;
  
}